﻿CREATE PROCEDURE [dbo].[proc_Assets_BF_Apply]
	(
		@Memo nvarchar(500),
		@GId uniqueidentifier,
		@zcbh VARCHAR(50),
		@memo_1 NVARCHAR(2000),
		@userid VARCHAR(30),
		@username_1 NVARCHAR(50)
	)
AS
	Update Assets Set
		IsApplyBf=1,		
		Memo=@Memo,
		ApplyBFDate = getdate()
	 Where GId=@GId
	 
	 	INSERT INTO [zcjl]
           ([zcbh]
           ,[memo]
           ,[lrrq]
           ,[userid]
           ,[username])
     VALUES
           (@zcbh
           ,@memo_1
           ,GETDATE()
           ,@userid
           ,@username_1)	
	RETURN
